#include<stdio.h>
int main()
{
   float score[5],sum;
   float min,max;
   double result;
   int i;
  for(i=0;i<5;i++)
  {
    scanf("%f",&score[i]);
    min=max=score[0];
    sum=0.0;
  }
  for(i=0;i<5;i++)
  {
    sum+=score[i];
    if(score[i]<min)
    {
      min=score[i];
    }
    else if(score[i]>max)
    {
      max=score[i];
    }
  }
  result = (sum-min-max)/3;
  printf("%.6f ",result);
}